﻿<%@ Page Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="Invoice.aspx.cs"
    Inherits="HoaDon.Invoice" Title="Hóa đơn" %>

<asp:Content ID="cthoadon" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:Panel ID="Top" runat="server" Width="1024px">
        <asp:Table ID="tbtop" runat="server" Width="1024px">
            <asp:TableRow runat="server">
                <asp:TableCell ID="tbc_nhomban" runat="server" VerticalAlign="Top" HorizontalAlign="Center"
                    Width="15%">                                
                </asp:TableCell>
                <asp:TableCell ID="tbc_ban" runat="server" VerticalAlign="Top" HorizontalAlign="Left"
                    Width="85%">                    
                </asp:TableCell>
            </asp:TableRow>
        </asp:Table>
    </asp:Panel>
    </br>
    <asp:Panel ID="Bottom" runat="server" Width="1024px">
        <asp:Panel ID="Midle" runat="server" Width="1024px">
            <asp:Table ID="tbmidle" runat="server" Width="1024px">
                <asp:TableRow ID="tbr_girdview" runat="server">
                    <asp:TableCell ID="tbc_girdview" runat="server" HorizontalAlign="Left" VerticalAlign="Top"
                        Width="40%">
                        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                            <ContentTemplate>
                                <asp:GridView ID="gdxdsmon" runat="server" AutoGenerateColumns="false" CssClass="GridViewInvoice"
                                    AllowPaging="True" ShowFooter="false" OnRowEditing="EditInvoice" OnRowUpdating="UpdateInvoice"
                                    OnRowCancelingEdit="CancelEditInvoice" PageSize="20">
                                    <Columns>
                                        <asp:TemplateField HeaderText="Mã" Visible="false">
                                            <ItemTemplate>
                                                <asp:Label ID="FK_VtID" runat="server" Text='<%# Eval("FK_VtID") %>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Món" ItemStyle-Width="30%">
                                            <ItemTemplate>
                                                <asp:Label ID="VtName" Width="100%" runat="server" Text='<%# Eval("VtName") %>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="SL" ItemStyle-Width="9%">
                                            <ItemTemplate>
                                                <asp:Label ID="So_luong" Width="100%" runat="server" Text='<%# Eval("So_luong","{0:#,#}") %>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Giá" ItemStyle-Width="15%">
                                            <ItemTemplate>
                                                <div style="text-align: right;">
                                                    <asp:Label ID="Gia" Width="100%" runat="server" Text='<%# Eval("Gia", "{0:#,#}") %>'></asp:Label>
                                                </div>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Ck" ItemStyle-Width="9%">
                                            <ItemTemplate>
                                                <div style="text-align: right;">
                                                    <asp:Label ID="lbchietkhau" Width="100%" runat="server" Text='<%# Eval("Ck","{0:#,#}") %>'></asp:Label>
                                                </div>
                                            </ItemTemplate>
                                            <EditItemTemplate>
                                                <div style="text-align: right;">
                                                    <asp:TextBox ID="tbchietkhau" Width="100%" runat="server" Text='<%# Eval("Ck","{0:#,#}") %>'></asp:TextBox>
                                                </div>
                                            </EditItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Tiền" ItemStyle-Width="20%">
                                            <ItemTemplate>
                                                <div style="text-align: right;">
                                                    <asp:Label ID="Tien" Width="100%" runat="server" Text='<%# Eval("Tien","{0:#,#}") %>'></asp:Label>
                                                </div>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Chỉnh" ItemStyle-Width="17%">
                                            <ItemTemplate>
                                                <asp:Button ID="btGiam" CssClass=" grid_button_0" runat="server" Text="-" CommandArgument='<%# Eval("Stt_rec0")%>'
                                                    OnClick="btGiam_Click"></asp:Button>
                                                <asp:Button ID="btchietkhau" CssClass=" grid_button_1" runat="server" Text="%" CommandArgument='<%# Eval("Stt_rec0")%>'
                                                    CommandName="Edit"></asp:Button>
                                            </ItemTemplate>
                                            <EditItemTemplate>
                                                <asp:Button ID="btDongy" CssClass=" grid_button_1" runat="server" Text="O" CommandArgument='<%# Eval("Stt_rec0")%>'
                                                    CommandName="Update"></asp:Button>
                                                <asp:Button ID="btHuy" CssClass=" grid_button_0" runat="server" Text="X" CommandArgument='<%# Eval("Stt_rec0")%>'
                                                    CommandName="Cancel"></asp:Button>
                                            </EditItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                </asp:GridView>
                            </ContentTemplate>
                            <Triggers>
                                <asp:AsyncPostBackTrigger ControlID="gdxdsmon" />
                            </Triggers>
                        </asp:UpdatePanel>
                    </asp:TableCell>
                    <asp:TableCell ID="tbc_monan" runat="server" HorizontalAlign="Left" VerticalAlign="Top">
                        <asp:Table ID="tbmon" runat="server">
                            <asp:TableRow ID="tbrnhommon" runat="server">
                                <asp:TableCell ID="tbc_nhommon" runat="server"></asp:TableCell>
                            </asp:TableRow>
                            <asp:TableRow ID="tbrmon" runat="server">
                                <asp:TableCell ID="tbc_mon" runat="server"></asp:TableCell>
                            </asp:TableRow>
                        </asp:Table>
                    </asp:TableCell>
                </asp:TableRow>
            </asp:Table>
        </asp:Panel>
        <asp:Table ID="tbsearchkh" runat="server" Width="1024px">
            <asp:TableRow ID="tbr_searchkh" runat="server">
                <asp:TableCell ID="tc_searchkh1" runat="server" VerticalAlign="Middle" HorizontalAlign="Left"
                    Font-Size="11" Font-Bold="true" Width="7%">
                    TÌM.KH
                </asp:TableCell>
                <asp:TableCell ID="tc_searchkh2" runat="server" VerticalAlign="Middle" HorizontalAlign="Left"
                    Font-Size="11" Font-Bold="true" Width="26%">
                    <asp:TextBox ID="txtDoiTac" runat="server" Width="100%" Font-Size="10"></asp:TextBox>
                </asp:TableCell>
                <asp:TableCell ID="tc_searchkh3" runat="server" VerticalAlign="Middle" HorizontalAlign="Center"
                    Font-Size="10" Width="3%">
                    <asp:Button ID="btnDoiTacSearch" runat="server" Text="..." CssClass="my_btn_searchkh"
                        OnClick="btnDoiTacSearch_Click" />
                </asp:TableCell>
                <asp:TableCell ID="tc_searchkh4" runat="server" VerticalAlign="Middle" HorizontalAlign="Left"
                    Font-Size="10">
                </asp:TableCell>
            </asp:TableRow>
        </asp:Table>
        <asp:Table ID="tbdoitac" runat="server" Width="1024px">
            <asp:TableRow ID="tbr_doitac" runat="server">
                <asp:TableCell ID="tc_doitac1" runat="server" VerticalAlign="Middle" HorizontalAlign="Left"
                    Font-Size="11" Font-Bold="true" Width="7%">
                    K.HÀNG
                </asp:TableCell>
                <asp:TableCell ID="tc_doitac2" runat="server" VerticalAlign="Middle" HorizontalAlign="Left"
                    Font-Size="11" Width="15%">
                    <asp:DropDownList ID="drDoiTac" runat="server" Width="100%" AutoPostBack="true" Font-Size="10"
                        OnSelectedIndexChanged="drDoiTac_SelectedChanged">
                    </asp:DropDownList>
                </asp:TableCell>
                <asp:TableCell ID="tc_doitac3" runat="server" VerticalAlign="Middle" HorizontalAlign="Left"
                    Font-Size="10">
                    <asp:Label ID="lblDoiTac" runat="server" Text=""></asp:Label>
                </asp:TableCell>
            </asp:TableRow>
        </asp:Table>
        <asp:Table ID="tbdiengiai" runat="server" Width="1024px">
            <asp:TableRow ID="tbr_diengiai" runat="server">
                <asp:TableCell ID="tc_diengiai1" runat="server" VerticalAlign="Middle" HorizontalAlign="Left"
                    Font-Size="11" Font-Bold="true" Width="7%">
                    D.GIẢI
                </asp:TableCell>
                <asp:TableCell ID="tc_diengiai2" runat="server" VerticalAlign="Middle" HorizontalAlign="Left"
                    Font-Size="10" Width="30%">
                    <asp:TextBox ID="txtDienGiai" runat="server" Width="100%" Font-Size="10"></asp:TextBox>
                </asp:TableCell>
                <asp:TableCell ID="tc_diengiai3" runat="server" VerticalAlign="Middle" HorizontalAlign="Left"
                    Font-Size="10" Font-Bold="true" ForeColor="#FF3300">                    
                </asp:TableCell>
            </asp:TableRow>
        </asp:Table>
        <asp:Table ID="tbthtt" runat="server" Width="1024px">
            <asp:TableRow ID="tbr_thtt" runat="server">
                <asp:TableCell ID="tc_thtt1" runat="server" VerticalAlign="Middle" HorizontalAlign="Left"
                    Font-Size="11" Font-Bold="true" Width="7%">
                    T.HÀNG
                </asp:TableCell>
                <asp:TableCell ID="tc_thtt2" runat="server" VerticalAlign="Middle" HorizontalAlign="Left"
                    Font-Size="11" Font-Bold="true" ForeColor="#FF3300" Width="12%">
                    <asp:TextBox ID="txtTienHang" runat="server" Width="90%" ReadOnly="true" Font-Size="11"
                        Font-Bold="true" Style="text-align: right"></asp:TextBox>
                </asp:TableCell>
                <asp:TableCell ID="tc_thtt3" runat="server" VerticalAlign="Middle" HorizontalAlign="Left"
                    Font-Size="11" Font-Bold="true" ForeColor="#FF3300" Width="7%">
                    T.TIỀN
                </asp:TableCell>
                <asp:TableCell ID="tc_thtt4" runat="server" VerticalAlign="Middle" HorizontalAlign="Left"
                    Font-Size="11" Width="12%">
                    <asp:TextBox ID="txtTongTien" runat="server" Width="90%" ReadOnly="true" Font-Size="11"
                        Font-Bold="true" Style="text-align: right"></asp:TextBox>
                </asp:TableCell>
                <asp:TableCell ID="tc_thtt5" runat="server" VerticalAlign="Middle" HorizontalAlign="Left"
                    Font-Size="11">
                </asp:TableCell>
            </asp:TableRow>
        </asp:Table>
        <asp:Table ID="tbckkd" runat="server" Width="1024px">
            <asp:TableRow ID="tbr_ckkd" runat="server">
                <asp:TableCell ID="tc_ckkd1" runat="server" VerticalAlign="Middle" HorizontalAlign="Left"
                    Font-Size="11" Font-Bold="true" Width="7%">
                    CK.TỔNG
                </asp:TableCell>
                <asp:TableCell ID="tc_ckkd2" runat="server" VerticalAlign="Middle" HorizontalAlign="Left"
                    Font-Size="11" Font-Bold="true" ForeColor="#FF3300" Width="12%">
                    <asp:TextBox ID="txtCKTong" runat="server" AutoPostBack="true" Width="90%" Font-Size="11"
                        Font-Bold="true" Style="text-align: right" OnTextChanged="txtCKTong_TextChanged"></asp:TextBox>
                </asp:TableCell>
                <asp:TableCell ID="tc_ckkd3" runat="server" VerticalAlign="Middle" HorizontalAlign="Left"
                    Font-Size="11" Font-Bold="true" ForeColor="#FF3300" Width="7%">
                    K.ĐƯA
                </asp:TableCell>
                <asp:TableCell ID="tc_ckkd4" runat="server" VerticalAlign="Middle" HorizontalAlign="Left"
                    Font-Size="11" Width="12%">
                    <asp:TextBox ID="txtKhachDua" runat="server" AutoPostBack="true" Width="90%" Font-Size="11"
                        Font-Bold="true" Style="text-align: right" OnTextChanged="txtKhachDua_TextChanged"></asp:TextBox>
                </asp:TableCell>
                <asp:TableCell ID="tc_ckkd5" runat="server" VerticalAlign="Middle" HorizontalAlign="Left"
                    Font-Size="11">
                </asp:TableCell>
            </asp:TableRow>
        </asp:Table>
        <asp:Table ID="tbchtl" runat="server" Width="1024px">
            <asp:TableRow ID="tbr_chtl" runat="server">
                <asp:TableCell ID="tbc_chtl1" runat="server" VerticalAlign="Middle" HorizontalAlign="Left"
                    Font-Size="11" Font-Bold="true" Width="7%">
                    C.HÀNG
                </asp:TableCell>
                <asp:TableCell ID="tbc_chtl2" runat="server" VerticalAlign="Middle" HorizontalAlign="Left"
                    Font-Size="11" Font-Bold="true" ForeColor="#FF3300" Width="12%">
                    <asp:DropDownList ID="drKho" runat="server" Width="90%" AutoPostBack="true" Font-Size="11"
                        OnSelectedIndexChanged="drKho_SelectedChanged">
                    </asp:DropDownList>
                </asp:TableCell>
                <asp:TableCell ID="tbc_chtl3" runat="server" VerticalAlign="Middle" HorizontalAlign="Left"
                    Font-Size="11" Font-Bold="true" ForeColor="#FF3300" Width="7%">
                    TRẢ LẠI
                </asp:TableCell>
                <asp:TableCell ID="tbc_chtl4" runat="server" VerticalAlign="Middle" HorizontalAlign="Left"
                    Font-Size="11" Font-Bold="true" ForeColor="#FF3300" Width="12%">
                    <asp:TextBox ID="txtTraLai" runat="server" Width="90%" ReadOnly="true" Font-Size="11"
                        Font-Bold="true" Style="text-align: right"></asp:TextBox>
                </asp:TableCell>
                <asp:TableCell ID="tbc_chtl5" runat="server" VerticalAlign="Middle" HorizontalAlign="Left"
                    Font-Size="11" Font-Bold="true" ForeColor="#FF3300" Width="3%">
                </asp:TableCell>
                <asp:TableCell ID="tbc_chucnang" runat="server" HorizontalAlign="Left">
                    <asp:Button ID="btthoanhtoan" runat="server" Text="Thanh toán" CssClass="my_btn_chucnang"
                        OnClick="btthoanhtoan_Click" />
                    <asp:Button ID="btLuu" runat="server" Text="Lưu" CssClass="my_btn_chucnang" OnClick="btLuu_Click" />
                    <asp:Button ID="btIn" runat="server" Text="In" CssClass="my_btn_chucnang" OnClick="btIn_Click" />
                    <asp:Button ID="btBoqua" runat="server" Text="Bỏ qua" CssClass="my_btn_chucnang"
                        OnClick="btBoqua_Click" />
                    <asp:Button ID="btTimLai" runat="server" Text="Tìm lại" CssClass="my_btn_chucnang"
                        OnClick="btTimLai_Click" />
                    <asp:Button ID="btXoa" runat="server" Text="Xóa" CssClass="my_btn_chucnang" OnClick="btXoa_Click" />
                </asp:TableCell>
            </asp:TableRow>
        </asp:Table>
    </asp:Panel>
</asp:Content>
